package io.renren.imooc.socket;

import com.xiaoleilu.hutool.io.IoUtil;

import java.io.*;
import java.net.Socket;

/**
 * Created by kun on 2017/5/2.
 */
public class Client {
    public static void main(String args[]){
        try {
            //创建客户端,指定服务端地址和端口
            Socket socket=new Socket("localhost",8888);
            //获取输出流,用来向服务端发送信息
            IoUtil.write(socket.getOutputStream(),true,"用户名密码是:121113/r222oot".getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
